package com.yusheng.tr.common.core.entity.multi;


import com.alibaba.fastjson2.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 报表日志表
 * </p>
 *
 * @author author
 * @since 2023-10-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("report_log")
@Schema(title ="ReportLog对象", description="报表日志表" )
public class ReportLogEntity implements Serializable {

    private static final long serialVersionUID = 1L;


    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    @Schema(name = "主键")
    private String id;

    @Schema(name = "结算单主键")
    private String stmtId;

    @Schema(name = "旧数据内容")
    private String oldContent;

    @Schema(name = "新数据内容")
    private String newContent;

    @Schema(name = "变更内容;新增不记录")
    private String diffContent;

    @Schema(name = "操作类型;ADD、UPATE、OTHER")
    private String operationType;


    @TableField(value = "create_by", fill = FieldFill.INSERT)
    @Schema(name = "创建人")
    private String createBy;


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(name = "创建时间")
    private Date createTime;

    @Schema(name = "ip地址")
    private String IpAddress;

    @Schema(name = "状态")
    private Integer status;

}
